import { Entity, Column } from 'typeorm';
import { Base } from '../base.entity';

@Entity()
export class Files extends Base {

    // 名称
    @Column({ length: 255, comment: '名称' })
    file_name: string;

    //路径
    @Column({ comment: '路径' })
    file_url: string;

    //封面
    @Column({ comment: '封面', nullable: true })
    file_cover: string;

    //原始名称
    @Column({ comment: '原始名称', default: '' })
    origin_name: string;

    //类型
    @Column({ type: 'smallint', comment: '类型' })
    file_type: number;

    //文件服务ID
    @Column({ type: 'smallint', comment: '类型', default: 0, nullable: true })
    server_id: number;

    //格式
    @Column({ comment: '格式' })
    file_format: string;

    //所属商户
    @Column({ comment: '所属商户ID', default: 0, nullable: true })
    business_id: number;

    //上传人ID
    @Column({ comment: '创建人user_id', default: 0, nullable: true })
    user_id: number;

}